<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>申请恢复额度</title>
    <link href="/Public/css/animate.css" rel="stylesheet">
    <link rel="stylesheet" href="/Public/css/toast.css">
    <link rel="stylesheet" href="/Public/css/gxxjkefu-normalize.css">
    <link rel="stylesheet" href="/Public/css/model.css">
    <link rel="stylesheet" href="/Public/css/bootstrap.min.css">

    <style>
        .found_info {
            padding: 4% 5% 15%;
            line-height: 35px;
            color: black;
            background: #ffffff;
        }

        .found_info p {
            font-size: 17px;
        }

        .found_info input, select {
            padding: 10px 15px;
            background: #f5f5f5;
            border: none;
            color: #989898;
            margin-bottom: 30px;
        }

        .found_info select {
            width: 200px;
            height: 40px;
        }

        .found_info .found_info_user span {
            display: inline-block;
        }

        textarea {
            background: #f5f5f5;
            border: none;
            padding: 1%;
        }

        .remark_div {
            width: 650px;
        }

        .remark_div input {
            background: #ff815a;
            border-radius: 3px;
            color: white;
            margin-top: 20px;
            width: 150px;
            height: 40px;
            line-height: 20px;
        }
        .search_table thead{
            background: #f0f8fa;
            border: none;
        }
        .table{
            margin: 0 auto;
            width: 100% !important;
            text-align: center;
        }
        .table>thead>tr>th {
            border-bottom:none !important;
            text-align: center !important;
        }
        .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th {
            border-top: 1px solid #f0f8fa !important;
            text-align: center !important;
        }
    </style>
</head>
<body>
<div id="main_C">
    <div class="scrollbar animated fadeInRight" id="style-1" style="overflow:scroll;overflow-x:hidden;margin: 0;width: 100%">
        <div class="title_info">
            <span>申请恢复额度</span>
        </div>
        <ul class="white_bgColor found_info">
            <li class="remark_div">
                <p>申请理由</p>
                <textarea name="" style="width:96%;height:210px;padding: 2%"  id="reason" placeholder="请填写申请理由"></textarea>
            </li>
            <li class="remark_div">
                <p>用户情况</p>
                <textarea name="" style="width:96%;height:210px;padding: 2%" id="content"  placeholder="请填写用户情况"></textarea>
                <input type="button" onclick="mark()" value="确认"/>
            </li>

        </ul>
    </div>
</div>
<script src="/Public/js/jquery-3.2.1.js"></script>
<script src="/Public/js/bootstrap.min.js"></script>
<script src="/Public/js/layer/layer.js"></script>
<script src="/Public/js/layui/layui.js"></script>
<script src="/Public/js/toast.js"></script>

<script>

    var vid = "<{$vid}>";
    function mark() {
        var index = layer.load(1, {
            shade: [0.1, '#fff'] //0.1透明度的白色背景
        });
        var url = "<{$SERVER_NAME}>/User/user_apply_quota";
        var content = $("#content").val();
        var reason = $("#reason").val();

        if (content == "" || reason == "") {
            layer.close(index);
            layer.alert("请信息填写完整！\r\n", {
                title: '提示框',
                icon: 0,
            });
            return false;
        }

        $.post(url, {vid: vid, content: content, reason: reason}, function (data) {
            console.log('123123',data);
            if (data.code == "1001") {
                $('#main_C').toast({
                    content: '申请成功！',
                    duration: 1000
                });
                 content = $("#content").val("");
                 reason = $("#reason").val("");

                 var obj=data.data;
                var s = "";
                var len = obj.length;
                for (var i = 0; i < len; i++) {
                    var j=i+1;
                    s+="  <tr>   " +
                        "<th scope='row'>"+j+"</th>" +
                        "  <td>"+obj[i].reson+"</td>" +
                        "  <td>"+obj[i].content+"</td>" +
                        "  <td>"+obj[i].name+"</td>" +
                        "  <td>"+obj[i].examine_status+"</td>" +
                        "<td>"+obj[i].examine_time+"</td> " +
                        "<td>"+obj[i].examine_name+"</td>" +
                        " <td>"+obj[i].ctime+"</td>" +
                        " </tr>";
                }
                document.getElementById("t_list").innerHTML = s;
            }
            else {
                layer.alert(data.result, {title: '提示框', icon: 2});
                layer.close(index);
            }
        });
        layer.close(index);
    }
</script>
</body>
</html>